package com.control;

import java.awt.Component;
import java.util.ArrayList;
import java.util.List;

import com.agent.Const;

public class AbtControl {
	public Component m_Object;
	public AbtControl m_Instance;
	public static List<String> properties = new ArrayList<String>();
	
	public AbtControl(){
		
	}
	
	public AbtControl(Component comp){
		if(m_Instance == null){
			m_Instance = new AbtControl();
		}
		
		m_Instance.setComponent(comp);
		
		initPropertiesList();
	}

	public static List<String> initPropertiesList() {
		if(properties == null){
			properties = new ArrayList<String>();
		}
		
		if(properties.size()==0){
			properties.add(Const.NAME);
			properties.add(Const.ROLE);
			properties.add(Const.VISIBLE);
			properties.add(Const.ENABLED);
			properties.add(Const.TOOLTIP);
		}
		
		return properties;
	}

	public void setComponent(Component comp) {
		m_Instance.m_Object = comp;
	}
	
	public Component getComponent(Component comp) {
		return m_Instance.m_Object;
	}

	public List<String> getPropertiesList() {
		return properties;
	}
}
